# -*- coding: utf-8 -*-
"""
    @Author：SimpleTree
    @date：2025/6/9 9:14
    @desc:
"""
from django.db.models import QuerySet

from dataset.models import DataSet


def get_embedding_model_id_by_dataset_id(dataset_id):
    dataset = QuerySet(DataSet).select_related("embedding_mode").filter(id=dataset_id).first()
    return str(dataset.embedding_model_id)


class ProblemParagraphObject:
    def __init__(self, dataset_id: str, document_id: str, paragraph_id: str, problem_content: str):
        self.dataset_id = dataset_id
        self.document_id = document_id
        self.paragraph_id = paragraph_id
        self.problem_content = problem_content


class ProblemParagraphManage:
    def __init__(self, problemParagraphObjectList: [ProblemParagraphObject], dataset_id):
        self.dataset_id = dataset_id
        self.problemParagraphObjectList = problemParagraphObjectList

